package a.f.e;

import a.c.d;
import a.c.e;
import a.c.q;
import a.d.c;
import a.d.n;
import a.d.p;
import a.d.s;
import a.d.t;
import a.d.v;
import a.d.x;
import a.f.*;
import a.f.c.h;

import java.util.Comparator;

import a.f.e.o;

class k
{
  private a.f.o a;
  private a.c.z b;
  private double c = 15.0D;
  private double d = 60.0D;
  private double e = 5.0D;
  private boolean f = true;
  private boolean g = true;
  private boolean h = true;
  private h i;
  
  public boolean a()
  {
    return this.h;
  }
  
  public void a(boolean paramBoolean)
  {
    this.h = paramBoolean;
  }
  
  public double b()
  {
    return this.e;
  }
  
  public void a(double paramDouble)
  {
    this.e = paramDouble;
  }
  
  public boolean c()
  {
    return this.g;
  }
  
  public void b(boolean paramBoolean)
  {
    this.g = paramBoolean;
  }
  
  public boolean d()
  {
    return this.f;
  }
  
  public void d(boolean paramBoolean)
  {
    this.f = paramBoolean;
  }
  
  public double e()
  {
    return this.d;
  }
  
  public void b(double paramDouble)
  {
    this.d = paramDouble;
  }
  
  public double f()
  {
    return this.c;
  }
  
  public void c(double paramDouble)
  {
    this.c = paramDouble;
  }
  
  public void a(a.f.o paramo)
  {
    a(paramo, null);
  }
  
  public void a(a.f.o paramo, a.c.k paramk)
  {
    int k = a.B;
    int j = a.A;
    this.a = paramo;
    if (k == 0)
    {
      if (paramo.c(i.c) != null) {
        this.i = new h(paramo);
      }
      a(paramk);
    }
    a.c.z localz = e(this.g);
    localz.a(new Comparator()
    {
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int i = a.B;
        k.e_ locale_1 = (k.e_)paramAnonymousObject1;
        k.e_ locale_2 = (k.e_)paramAnonymousObject2;
        if (i == 0)
        {
          if (locale_1.h > locale_2.h) {
            return -1;
          }
          if (i != 0) {}
        }
        else if (locale_1.h < locale_2.h)
        {
          return 1;
        }
        return 0;
      }
    });
    a.c.y localy = localz.h();
    if (localy.e()) {}
    while (k != 0)
    {
      e_ locale_ = (e_)localy.j();
      c(locale_);
      localy.f();
      if ((k == 0) && (j != 0)) {
        return;
      }
      if (j == 0) {
        break;
      }
    }
    if ((k != 0) || (this.i != null))
    {
      this.i.e();
      this.i = null;
    }
  }
  
  private boolean a(xc paramxc)
  {
    yc localyc = paramxc.a();
    return localyc instanceof cc;
  }
  
  private boolean a(wb paramwb)
  {
    xb localxb = paramwb.a();
    return localxb instanceof bc;
  }
  
  private boolean a(e parame, xc paramxc)
  {
    int j = a.B;
    t localt = a(paramxc, parame);
    if ((j != 0) || (this.a.v(parame).b(localt))) {
      if (j != 0) {}
    }
    return !(paramxc instanceof cc);
  }
  
  private void a(a.c.k paramk)
  {
    int n = a.B;
    int m = a.A;
    this.b = new a.c.z();
    Object localObject1 = this.a.v();
    Object localObject2;
    Object localObject3;
    Object localObject4;
    label238:
    label240:
    do
    {
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break label243;
        }
        localObject2 = ((a.c.w)localObject1).d();
        if (m != 0) {
          break label244;
        }
        if (((n == 0) && (this.i == null)) || ((n != 0) || (!this.i.e((e)localObject2))))
        {
          this.b.add(new e_(localObject2, localObject2, (byte)0, false));
          localObject3 = this.a.f(localObject2);
          int j = 0;
          do
          {
            if (j >= localObject3.length) {
              break;
            }
            localObject4 = localObject3[j];
            if (n != 0) {
              break label240;
            }
            if (m != 0) {
              break label238;
            }
            if (((n == 0) && (paramk == null)) || (((n != 0) || (paramk.getBool(localObject4))) && ((n != 0) || (a((xc)localObject4))))) {
              if (n != 0) {}
            }
            boolean bool1 = !a((e)localObject2, (xc)localObject4);
            this.b.add(new e_(localObject4, localObject2, (byte)2, bool1));
            j++;
          } while (m == 0);
        }
      } while (n != 0);
      ((a.c.w)localObject1).f();
    } while (m == 0);
    label243:
    label244:
    localObject1 = this.a.w();
    label379:
    label509:
    label511:
    do
    {
      do
      {
        if (!((a.c.m)localObject1).e()) {
          return;
        }
        localObject2 = ((a.c.m)localObject1).a();
        localObject3 = this.a.n((d)localObject2);
        x localx = ((a.d.y)localObject3).b();
        localObject4 = localx.a();
        localx.f();
        Object localObject5;
        do
        {
          do
          {
            if (!localx.e()) {
              break label379;
            }
            localObject5 = localx.a();
            n localn = new n((a.d.w)localObject4, (a.d.w)localObject5);
            this.b.add(new e_(localn, localObject2, (byte)1, false));
            localObject4 = localObject5;
            localx.f();
            if ((n == 0) && (m != 0)) {
              break;
            }
          } while (m == 0);
          localObject5 = this.a.g(localObject2);
        } while (n != 0);
        int k = 0;
        do
        {
          if (k >= localObject5.length) {
            break;
          }
          Object localObject6 = localObject5[k];
          if (n != 0) {
            break label511;
          }
          if (m != 0) {
            break label509;
          }
          if (((n == 0) && (paramk == null)) || ((n != 0) || (paramk.getBool(localObject6)))) {
            if (n != 0) {}
          }
          boolean bool2 = a(localObject6);
          this.b.add(new e_(localObject6, localObject2, (byte)3, bool2));
          k++;
        } while (m == 0);
      } while (n != 0);
      ((a.c.m)localObject1).f();
    } while (m == 0);
  }
  
  private double a(e_ parame_)
  {
    t localt = parame_.a();
    double d1 = Math.sqrt(localt.b() * localt.b() + localt.c() * localt.c());
    return this.c + d1 * 0.5D;
  }
  
  private a.c.z a(a.d.o paramo, e_ parame_)
  {
    int k = a.B;
    int j = a.A;
    a.c.z localz = new a.c.z();
    double d1 = a(parame_);
    a.c.y localy = this.b.h();
    if (localy.e()) {}
    label150:
    label159:
    while (k != 0)
    {
      e_ locale_ = (e_)localy.j();
      if (k == 0)
      {
        if (locale_ != parame_)
        {
          if (k == 0) {
            if (locale_.g == 1)
            {
              n localn = (n)locale_.e;
              if (k != 0) {
                break label159;
              }
              if (!a.d.o.a(paramo, localn, d1)) {
                break label150;
              }
              localz.add(locale_);
              if (k != 0) {
                break label159;
              }
              if (j == 0) {
                break label150;
              }
            }
          }
          if (k != 0) {
            break label159;
          }
          if (a.d.o.a(paramo, locale_.a(), d1)) {
            localz.add(locale_);
          }
        }
        localy.f();
      }
      if (j == 0) {
        break;
      }
    }
    return localz;
  }
  
  private a.c.z e(boolean paramBoolean)
  {
    int k = a.B;
    int j = a.A;
    a.d.m.a(this.b, new d_());
    a.c.z localz = new a.c.z();
    a.c.y localy = this.b.h();
    if (localy.e()) {}
    label116:
    label124:
    while (k != 0)
    {
      e_ locale_ = (e_)localy.j();
      if (k == 0)
      {
        if (locale_.b())
        {
          if (k != 0) {
            break label124;
          }
          if (locale_.i)
          {
            if (k == 0) {
              if (paramBoolean)
              {
                if (k != 0) {
                  break label124;
                }
                if (locale_.h <= 0) {
                  break label116;
                }
              }
            }
            localz.add(locale_);
          }
        }
        localy.f();
      }
      if (j == 0) {
        break;
      }
    }
    return localz;
  }
  
  private a.d.w b(e_ parame_)
  {
    int j = a.B;
    t localt = parame_.a();
    a.d.w localw = new a.d.w(localt.d() + localt.b() * 0.5D, localt.e() + localt.c() * 0.5D);
    Object localObject;
    if (j == 0) {
      if (parame_.g == 3)
      {
        localObject = (d)parame_.f;
        a.d.y localy = this.a.n((d)localObject);
        double[] arrayOfDouble = b_.a(localy, localw);
        return new a.d.w(arrayOfDouble[0], arrayOfDouble[1]);
      }
    }
    if ((j != 0) || (parame_.g == 2))
    {
      localObject = (e)parame_.f;
      return this.a.o((e)localObject);
    }
    return localw;
  }
  
  private a.d.o a(a.d.w paramw1, a.d.w paramw2, ic paramic)
  {
    int j = a.B;
    if (j == 0) {
      if (this.h)
      {
        if (j != 0) {
          break label37;
        }
        if (b(paramic)) {
          return null;
        }
      }
    }
    label37:
    a.d.o localo;
    if (paramw1.equals(paramw2))
    {
      localo = new a.d.o(paramw1.a() - this.d, paramw1.b() + this.d, 2.0D * this.d, 2.0D * this.d);
      if (a.A == 0) {}
    }
    else
    {
      a.d.z localz1 = new a.d.z(paramw2, paramw1);
      double d1 = localz1.d();
      double d2 = Math.max(this.d - d1, 0.0D);
      localz1.c();
      a.d.z localz2 = a.d.z.c(localz1);
      a.d.w localw = a.d.z.a(paramw1, new a.d.z(-localz2.a() * this.d, -localz2.b() * this.d));
      if (d2 > 0.0D) {
        localw = a.d.z.a(localw, new a.d.z(-localz1.a() * d2, -localz1.b() * d2));
      }
      localo = new a.d.o(localw, new s(this.d + d2, 2.0D * this.d), localz1);
      if (((j != 0) || (this.h)) && ((j != 0) || ((this.d > d1) && (a(paramic))))) {
        localo = new a.d.o(localw, new s(d1 + d2, 2.0D * this.d), localz1);
      }
    }
    return localo;
  }
  
  private boolean a(ic paramic)
  {
    int k = a.B;
    if (k == 0) {
      if ((paramic instanceof wb))
      {
        wb localwb = (wb)paramic;
        int j = localwb.b().b();
        if (k == 0) {
          if (j != 16) {
            if (k != 0) {
              break label55;
            }
          }
        }
        label55:
        return j == 32;
      }
    }
    return false;
  }
  
  private boolean b(ic paramic)
  {
    int k = a.B;
    if (k == 0) {
      if ((paramic instanceof wb))
      {
        wb localwb = (wb)paramic;
        int j = localwb.b().b();
        if (k == 0) {}
        return j == 8;
      }
    }
    return false;
  }
  
  private boolean c(e_ parame_)
  {
    ic localic = (ic)parame_.e;
    t localt = parame_.a();
    a.d.w localw1 = new a.d.w(localt.d() + localt.b() * 0.5D, localt.e() + localt.c() * 0.5D);
    a.d.w localw2 = b(parame_);
    a.d.o localo = a(localw1, localw2, localic);
    if (localo == null) {
      return false;
    }
    a.c.z localz = a(localo, parame_);
    c_ localc_1 = a(localz);
    c_ localc_2 = a(d(parame_), this.c);
    localo = new a.d.o(localo.d() / this.c, localo.e() / this.c, localo.g() / this.c, localo.h() / this.c, localo.i(), localo.j());
    int j = (int)Math.floor(localw1.a / this.c);
    int k = (int)Math.floor(localw1.b / this.c);
    int m = (int)Math.max(1.0D, Math.ceil(this.e / this.c));
    int n = (int)Math.floor(this.d / this.c);
    boolean bool = localc_2.a(localc_1, j, k, m, n, localo, this.f);
    if (a.B == 0) {
      if (bool)
      {
        double d1 = localw1.a() + localc_2.a() * this.c;
        double d2 = localw1.b() + localc_2.b() * this.c;
        a(localic, d1, d2, parame_.f);
      }
    }
    return bool;
  }
  
  private void a(ic paramic, double paramDouble1, double paramDouble2, Object paramObject)
  {
    int j = a.B;
    Object localObject1;
    Object localObject2;
    Object localObject3;
    Object localObject4;
    if (j == 0) {
      if ((paramic instanceof wb))
      {
        localObject1 = (wb)paramic;
        localObject2 = ((wb)localObject1).a();
        localObject3 = (d)paramObject;
        localObject4 = this.a.e(localObject3);
        zc localzc1 = this.a.d(((d)localObject3).e());
        zc localzc2 = this.a.d(((d)localObject3).f());
        a.d.o localo = new a.d.o(paramic.d());
        localo.g(paramDouble1, paramDouble2);
        Object localObject5 = ((xb)localObject2).a(localo, (zb)localObject4, localzc1, localzc2);
        ((wb)localObject1).a(localObject5);
      }
    }
    if ((j != 0) || ((a.A != 0) && ((j != 0) || ((paramic instanceof xc)))))
    {
      localObject1 = (xc)paramic;
      localObject2 = new a.d.o(paramic.d());
      ((a.d.o)localObject2).g(paramDouble1, paramDouble2);
      localObject3 = ((xc)localObject1).a();
      localObject4 = ((yc)localObject3).a((a.d.o)localObject2, this.a.d(paramObject));
      ((xc)localObject1).a(localObject4);
    }
  }
  
  private t a(ic paramic, Object paramObject)
  {
    int j = a.B;
    Object localObject1;
    Object localObject2;
    a.d.o localo;
    if (j == 0) {
      if ((paramic instanceof wb))
      {
        localObject1 = (wb)paramic;
        localObject2 = (d)paramObject;
        localo = ((wb)localObject1).a().a(((wb)localObject1).d().f(), this.a.e(localObject2), this.a.d(((d)localObject2).e()), this.a.d(((d)localObject2).f()), ((wb)localObject1).e());
        return localo.a();
      }
    }
    if ((j != 0) || ((paramic instanceof xc)))
    {
      localObject1 = (xc)paramic;
      localObject2 = (e)paramObject;
      localo = ((xc)localObject1).a().a(((xc)localObject1).d().f(), this.a.d(localObject2), ((xc)localObject1).e());
      return localo.a();
    }
    return null;
  }
  
  private a.d.o d(e_ parame_)
  {
    int j = a.B;
    if (j == 0) {
      if (!parame_.b()) {
        return null;
      }
    }
    Object localObject1;
    Object localObject2;
    s locals;
    a.d.o localo;
    if (j == 0) {
      if ((parame_.e instanceof wb))
      {
        localObject1 = (wb)parame_.e;
        localObject2 = (d)parame_.f;
        locals = ((wb)localObject1).d().f();
        localo = ((wb)localObject1).a().a(locals, this.a.e(localObject2), this.a.d(((d)localObject2).e()), this.a.d(((d)localObject2).f()), ((wb)localObject1).e());
        return localo;
      }
    }
    if ((j != 0) || ((parame_.e instanceof xc)))
    {
      localObject1 = (xc)parame_.e;
      localObject2 = (e)parame_.f;
      locals = ((xc)localObject1).d().f();
      localo = ((xc)localObject1).a().a(locals, this.a.d(localObject2), ((xc)localObject1).e());
      return localo;
    }
    return null;
  }
  
  private c_ a(t paramt)
  {
    int j = 2147483647;
    int k = -2147483648;
    int m = 2147483647;
    int n = -2147483648;
    double d1 = paramt.b();
    double d2 = paramt.c();
    double d3 = paramt.d();
    double d4 = paramt.e();
    j = Math.min((int)Math.floor(d3 / this.c), j);
    m = Math.min((int)Math.floor(d4 / this.c), m);
    k = Math.max((int)Math.floor((d3 + d1) / this.c), k);
    n = Math.max((int)Math.floor((d4 + d2) / this.c), n);
    j -= 2;
    m -= 2;
    k += 2;
    n += 2;
    c_ localc_ = new c_(j, m, k - j, n - m);
    localc_.a((int)Math.floor(d3 / this.c), (int)Math.floor(d4 / this.c), 1 + (int)Math.floor((d3 + d1) / this.c), 1 + (int)Math.floor((d4 + d2) / this.c));
    return localc_;
  }
  
  private c_ a(a.c.z paramz)
  {
    int i2 = a.B;
    int i1 = a.A;
    int j = 2147483647;
    int k = -2147483648;
    int m = 2147483647;
    int n = -2147483648;
    Rectangle2D.Double localDouble = new Rectangle2D.Double();
    Object localObject1 = paramz.h();
    Object localObject3;
    do
    {
      if (!((a.c.y)localObject1).e()) {
        break;
      }
      localObject2 = (e_)((a.c.y)localObject1).j();
      localObject3 = ((e_)localObject2).a();
      localDouble.setFrame(((t)localObject3).d(), ((t)localObject3).e(), ((t)localObject3).b(), ((t)localObject3).c());
      j = Math.min((int)Math.floor(localDouble.x / this.c), j);
      m = Math.min((int)Math.floor(localDouble.y / this.c), m);
      k = Math.max((int)Math.floor((localDouble.x + localDouble.width) / this.c), k);
      n = Math.max((int)Math.floor((localDouble.y + localDouble.height) / this.c), n);
      ((a.c.y)localObject1).f();
      if ((i2 == 0) && (i1 != 0)) {
        break label224;
      }
    } while (i1 == 0);
    j -= 2;
    m -= 2;
    k += 2;
    if (i2 == 0) {
      n += 2;
    }
    label224:
    localObject1 = new c_(j, m, k - j, n - m);
    Object localObject2 = paramz.h();
    if (((a.c.y)localObject2).e()) {}
    label373:
    label382:
    while (i2 != 0)
    {
      localObject3 = (e_)((a.c.y)localObject2).j();
      Object localObject4;
      if (i2 == 0) {
        if (((e_)localObject3).g == 1)
        {
          localObject4 = (n)((e_)localObject3).e;
          a((c_)localObject1, (n)localObject4, this.c);
          if (i2 != 0) {
            break label382;
          }
          if (i1 == 0) {
            break label373;
          }
        }
      }
      if ((i2 != 0) || (((e_)localObject3).g == 0))
      {
        localObject4 = ((e_)localObject3).a();
        a((c_)localObject1, (t)localObject4, this.c);
        if (i2 != 0) {
          break label382;
        }
        if (i1 == 0) {}
      }
      else
      {
        a((c_)localObject1, d((e_)localObject3), this.c);
      }
      ((a.c.y)localObject2).f();
      if (i1 == 0) {
        break;
      }
    }
    return localObject1;
  }
  
  static void a(c_ paramc_, a.d.o paramo, double paramDouble)
  {
    paramc_.b(a(paramo, paramDouble));
  }
  
  static c_ a(a.d.o paramo, double paramDouble)
  {
    int i2 = a.B;
    int i1 = a.A;
    t localt = paramo.a();
    int j = (int)(Math.floor(localt.d / paramDouble) - 2.0D);
    int k = (int)(Math.floor(localt.e / paramDouble) - 2.0D);
    int m = (int)(Math.floor((localt.d + localt.a) / paramDouble) + 2.0D);
    int n = (int)(Math.floor((localt.e + localt.b) / paramDouble) + 2.0D);
    c_ localc_ = new c_(j, k, m - j, n - k);
    a.d.w[] arrayOfw = a.d.o.a(paramo);
    a(localc_, arrayOfw[0], arrayOfw[1], paramDouble);
    a(localc_, arrayOfw[1], arrayOfw[2], paramDouble);
    a(localc_, arrayOfw[2], arrayOfw[3], paramDouble);
    a(localc_, arrayOfw[3], arrayOfw[0], paramDouble);
    localc_.d();
    if ((i2 != 0) || (i1 != 0))
    {
      if (i2 == 0) {}
      q.n = !q.n;
    }
    if (i2 != 0) {
      q.o = !q.o;
    }
    return localc_;
  }
  
  static void a(c_ paramc_, t paramt, double paramDouble)
  {
    Rectangle2D.Double localDouble = new Rectangle2D.Double();
    localDouble.setFrame(paramt.d(), paramt.e(), paramt.b(), paramt.c());
    paramc_.a((int)Math.floor(localDouble.x / paramDouble), (int)Math.floor(localDouble.y / paramDouble), 1 + (int)Math.floor((localDouble.x + localDouble.width) / paramDouble), 1 + (int)Math.floor((localDouble.y + localDouble.height) / paramDouble));
  }
  
  static void a(c_ paramc_, n paramn, double paramDouble)
  {
    a(paramc_, paramn.d(), paramn.e(), paramDouble);
  }
  
  static void a(c_ paramc_, a.d.w paramw1, a.d.w paramw2, double paramDouble)
  {
    int i8 = a.B;
    int i7 = a.A;
    double d1 = paramw1.a;
    double d2 = paramw1.b;
    double d3 = paramw2.a;
    double d4 = paramw2.b;
    double d5 = d3 - d1;
    double d6 = d4 - d2;
    double d7 = 0.1D;
    if (i8 == 0) {
      if (paramDouble > 1.0D)
      {
        int j = 1 + (int)Math.rint(paramDouble);
        do
        {
          if (j <= 0) {
            break;
          }
          if (i8 != 0) {
            break label126;
          }
          d7 /= 10.0D;
          j /= 10;
          if (i7 != 0) {
            break label123;
          }
        } while (i7 == 0);
      }
    }
    if (i8 == 0) {
      d7 = Math.min(d7, 1.E-005D);
    }
    label123:
    label126:
    double d8 = 0.1D;
    if (i8 == 0)
    {
      if (paramDouble > 1.0D)
      {
        k = 1 + (int)Math.rint(paramDouble);
        do
        {
          if (k <= 0) {
            break;
          }
          d8 /= 10.0D;
          k /= 10;
          if (i8 != 0) {
            break label211;
          }
          if (i7 != 0) {
            break label203;
          }
        } while (i7 == 0);
      }
      d8 = Math.min(d8, 1.E-005D);
    }
    int k = (int)Math.floor(d1 / paramDouble);
    label203:
    label211:
    int m = (int)Math.floor(d2 / paramDouble);
    int n = (int)Math.floor(d3 / paramDouble);
    int i1 = (int)Math.floor(d4 / paramDouble);
    int i2 = n - k;
    int i3 = i1 - m;
    if (i8 == 0)
    {
      if (i2 != 0)
      {
        if (i8 != 0) {
          break label311;
        }
        if (Math.abs(d5) >= d7) {}
      }
      else
      {
        paramc_.a(k, Math.min(m, i1), k + 1, Math.max(m, i1) + 1);
      }
    }
    else
    {
      if (i8 != 0) {
        break label1081;
      }
      if (i7 == 0) {
        break label1078;
      }
    }
    label311:
    if (i8 == 0)
    {
      if (i3 != 0)
      {
        if (i8 != 0) {
          break label382;
        }
        if (Math.abs(d6) >= d8) {}
      }
      else
      {
        paramc_.a(Math.min(k, n), m, Math.max(k, n) + 1, m + 1);
      }
    }
    else
    {
      if (i8 != 0) {
        break label1081;
      }
      if (i7 == 0) {
        break label1078;
      }
    }
    label382:
    double d9;
    double d10;
    double d11;
    double d12;
    int i4;
    int i5;
    int i6;
    if (i8 == 0) {
      if (Math.abs(d5) > Math.abs(d6))
      {
        if (k > n)
        {
          d9 = d6 / d5;
          d10 = d4;
          d11 = (Math.floor(d3 / paramDouble) + 1.0D - n) * d9 + d4;
          d12 = paramDouble * d9;
          i4 = n;
          do
          {
            do
            {
              if (i4 >= k) {
                break;
              }
              i5 = (int)Math.floor(d10 / paramDouble);
              i6 = (int)Math.floor(d11 / paramDouble);
              paramc_.a(i4, i5, true);
              if (i7 != 0) {
                break label555;
              }
              if (i5 != i6)
              {
                if (i8 != 0) {
                  continue;
                }
                if (i4 < k) {
                  paramc_.a(i4, i6, true);
                }
              }
              d10 = d11;
              d11 += d12;
              i4++;
            } while (i7 == 0);
            i4 = (int)Math.floor(d10 / paramDouble);
            paramc_.a(k, i4, true);
          } while (i8 != 0);
          label555:
          if (i4 == m) {
            break label1078;
          }
          paramc_.a(k, m, true);
          if (i8 != 0) {
            break label1081;
          }
          if (i7 == 0) {
            break label1078;
          }
        }
        d9 = d6 / d5;
        d10 = d2;
        d11 = (Math.floor(d1 / paramDouble) + 1.0D - k) * d9 + d2;
        d12 = paramDouble * d9;
        i4 = k;
        do
        {
          do
          {
            if (i4 >= n) {
              break;
            }
            i5 = (int)Math.floor(d10 / paramDouble);
            i6 = (int)Math.floor(d11 / paramDouble);
            paramc_.a(i4, i5, true);
            if (i7 != 0) {
              break label723;
            }
            if (i5 != i6) {
              paramc_.a(i4, i6, true);
            }
            d10 = d11;
            d11 += d12;
            i4++;
          } while (i7 == 0);
          i4 = (int)Math.floor(d10 / paramDouble);
          paramc_.a(n, i4, true);
        } while (i8 != 0);
        label723:
        if (i4 == i1) {
          break label1078;
        }
        paramc_.a(n, i1, true);
        if (i8 != 0) {
          break label1081;
        }
        if (i7 == 0) {
          break label1078;
        }
      }
    }
    if (m > i1)
    {
      d9 = d5 / d6;
      d10 = d3;
      d11 = (Math.floor(d4 / paramDouble) + 1.0D - i1) * d9 + d3;
      d12 = paramDouble * d9;
      i4 = i1;
      do
      {
        do
        {
          if (i4 >= m) {
            break;
          }
          i5 = (int)Math.floor(d10 / paramDouble);
          i6 = (int)Math.floor(d11 / paramDouble);
          paramc_.a(i5, i4, true);
          if (i7 != 0) {
            break label898;
          }
          if (i5 != i6) {
            paramc_.a(i6, i4, true);
          }
          d10 = d11;
          d11 += d12;
          i4++;
        } while (i7 == 0);
        i4 = (int)Math.floor(d10 / paramDouble);
        paramc_.a(i4, m, true);
      } while (i8 != 0);
      if (i4 != k)
      {
        label898:
        paramc_.a(k, m, true);
        if (i8 != 0) {
          break label1081;
        }
        if (i7 == 0) {}
      }
    }
    else
    {
      d9 = d5 / d6;
      d10 = d1;
      d11 = (Math.floor(d2 / paramDouble) + 1.0D - m) * d9 + d1;
      d12 = paramDouble * d9;
      i4 = m;
      do
      {
        do
        {
          if (i4 >= i1) {
            break;
          }
          i5 = (int)Math.floor(d10 / paramDouble);
          i6 = (int)Math.floor(d11 / paramDouble);
          paramc_.a(i5, i4, true);
          if (i7 != 0) {
            break label1066;
          }
          if (i5 != i6) {
            paramc_.a(i6, i4, true);
          }
          d10 = d11;
          d11 += d12;
          i4++;
        } while (i7 == 0);
        i4 = (int)Math.floor(d10 / paramDouble);
        paramc_.a(i4, i1, true);
      } while (i8 != 0);
      if (i4 != n) {
        label1066:
        paramc_.a(n, i1, true);
      }
    }
    label1078:
    label1081:
    if (i8 == 0)
    {
      if (q.n) {
        i7++;
      }
    }
    else {
      a.A = i7;
    }
    if (q.o)
    {
      i8++;
      a.B = i8;
    }
  }
  
  static class b_
  {
    static double[] a(a.d.y paramy, a.d.w paramw)
    {
      int k = a.B;
      int j = a.A;
      double[] arrayOfDouble = new double[6];
      double d1 = 0.0D;
      v localv = paramy.l();
      if (k == 0) {
        if (!localv.e()) {
          return null;
        }
      }
      a.d.w localw1 = localv.a().d();
      double d2 = a.d.w.a(paramw.a(), paramw.b(), localw1.a(), localw1.b());
      arrayOfDouble[0] = localw1.a();
      arrayOfDouble[1] = localw1.b();
      arrayOfDouble[2] = d2;
      arrayOfDouble[3] = 0.0D;
      arrayOfDouble[4] = 0.0D;
      arrayOfDouble[5] = 0.0D;
      int i = 0;
      double d3 = 0.0D;
      label352:
      label357:
      do
      {
        if (!localv.e()) {
          break;
        }
        n localn = localv.a();
        a.d.w localw2 = localn.d();
        a.d.w localw3 = localn.e();
        a.d.z localz1 = new a.d.z(localw3, localw2);
        double d4 = localz1.d();
        d1 += d4;
        localz1.c();
        c localc1 = new c(localw2, localz1);
        c localc2 = new c(paramw, a.d.z.c(localz1));
        a.d.w localw4 = c.a(localc1, localc2);
        a.d.z localz2 = new a.d.z(localw4, localw2);
        a.d.z localz3 = new a.d.z(localw3, localw2);
        double d5 = a.d.z.c(localz3, localz1);
        double d6 = a.d.z.c(localz2, localz1);
        if (j != 0) {
          break label438;
        }
        double d7;
        a.d.w localw5;
        double d8;
        if (d6 <= 0.0D)
        {
          d7 = a.d.w.a(paramw, localw2);
          localw5 = localw2;
          d8 = 0.0D;
          if (k != 0) {
            break label357;
          }
          if (j == 0) {}
        }
        else
        {
          if (k == 0) {
            if (d6 >= d5)
            {
              d7 = a.d.w.a(paramw, localw3);
              localw5 = localw3;
              d8 = 1.0D;
              if (k != 0) {
                break label357;
              }
              if (j == 0) {
                break label352;
              }
            }
          }
          d7 = a.d.w.a(paramw, localw4);
          localw5 = localw4;
          d8 = d6 / d5;
        }
        if (k == 0)
        {
          if (d7 < d2)
          {
            d2 = d7;
            arrayOfDouble[0] = localw5.a();
            arrayOfDouble[1] = localw5.b();
            arrayOfDouble[2] = d2;
            arrayOfDouble[3] = i;
            arrayOfDouble[4] = d8;
            arrayOfDouble[5] = (d4 * d8 + d3);
          }
          i++;
          d3 = d1;
          localv.f();
        }
      } while (j == 0);
      if ((k == 0) && (d1 > 0.0D))
      {
        label438:
        if (k != 0) {
          break label464;
        }
        arrayOfDouble[5] /= d1;
        if (j == 0) {}
      }
      else
      {
        arrayOfDouble[5] = 0.0D;
      }
      label464:
      return arrayOfDouble;
    }
  }
  
  static final class c_
  {
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    private o g;
    private int h;
    private int i;
    private int j;
    
    c_(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      this.a = paramInt3;
      this.b = paramInt4;
      this.c = paramInt1;
      this.e = 0;
      this.d = paramInt2;
      this.f = 0;
      this.g = new o(paramInt3 * paramInt4);
    }
    
    int a()
    {
      return this.e;
    }
    
    int b()
    {
      return this.f;
    }
    
    void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      int n = a.B;
      int m = a.A;
      int k = paramInt2;
      do
      {
        while (m == 0)
        {
          if (k >= paramInt4) {
            break;
          }
          a(paramInt1, paramInt3, k, true);
          k++;
        }
      } while (n != 0);
    }
    
    void d()
    {
      int i3 = a.B;
      int i2 = a.A;
      int[] arrayOfInt1 = new int[this.b];
      int[] arrayOfInt2 = new int[this.b];
      int[] arrayOfInt3 = new int[this.a];
      int[] arrayOfInt4 = new int[this.a];
      int k = 0;
      do
      {
        do
        {
          if (k >= arrayOfInt1.length) {
            break;
          }
          arrayOfInt1[k] = this.a;
          arrayOfInt2[k] = -1;
          k++;
          if (i3 != 0) {
            break label90;
          }
          if (i2 != 0) {
            break label88;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      k = 0;
      label88:
      label90:
      do
      {
        do
        {
          if (k >= arrayOfInt3.length) {
            break;
          }
          arrayOfInt3[k] = this.b;
          arrayOfInt4[k] = -1;
          k++;
          if (i3 != 0) {
            break label144;
          }
          if (i2 != 0) {
            break label142;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      k = this.g.nextSetBit(0);
      label142:
      label144:
      int n;
      do
      {
        do
        {
          if (k < 0) {
            break;
          }
          m = k % this.a;
          n = k / this.a;
          arrayOfInt1[n] = Math.min(arrayOfInt1[n], m);
          arrayOfInt3[m] = Math.min(arrayOfInt3[m], n);
          arrayOfInt2[n] = Math.max(arrayOfInt2[n], m);
          arrayOfInt4[m] = Math.max(arrayOfInt4[m], n);
          k = this.g.nextSetBit(k + 1);
          if (i3 != 0) {
            break label256;
          }
          if (i2 != 0) {
            break label255;
          }
        } while (i2 == 0);
      } while (i3 != 0);
      k = 0;
      label255:
      int m = 0;
      label256:
      label354:
      do
      {
        do
        {
          if (m >= this.b) {
            return;
          }
          n = arrayOfInt1[m];
          do
          {
            if (n >= arrayOfInt2[m]) {
              break;
            }
            if (i3 != 0) {
              break label403;
            }
            if (i2 != 0) {
              break label395;
            }
            if (arrayOfInt3[n] <= m)
            {
              if (i3 != 0) {
                continue;
              }
              if (arrayOfInt4[n] >= m)
              {
                int i1 = n + 1;
                do
                {
                  if (arrayOfInt3[i1] > m) {
                    break label354;
                  }
                  if (i2 != 0) {
                    break;
                  }
                  if (arrayOfInt4[i1] < m) {
                    break label354;
                  }
                  i1++;
                } while (i2 == 0);
                if (i3 != 0) {
                  break;
                }
                this.g.set(k + n, k + i1);
              }
            }
            n++;
          } while (i2 == 0);
        } while (i3 != 0);
        k += this.a;
        m++;
      } while (i2 == 0);
      label395:
      label403:
      return;
    }
    
    void a(c_ paramc_, int paramInt1, int paramInt2, double paramDouble, boolean paramBoolean)
    {
      int i4 = a.B;
      int i3 = a.A;
      int k = this.c + this.a / 2;
      int m = this.d + this.b / 2;
      c(paramInt1 - k, paramInt2 - m);
      if (i4 == 0) {
        if (paramBoolean)
        {
          n = 0;
          do
          {
            if (a(paramc_, 0, 0, n)) {
              break;
            }
            n++;
            if ((i4 == 0) && (i3 != 0)) {
              return;
            }
          } while (i3 == 0);
        }
      }
      int n = 0;
      int i1 = 0;
      label139:
      label155:
      label235:
      if (i4 == 0)
      {
        if (i4 == 0) {
          if (a(paramc_, 0, 0)) {
            paramc_.b(this);
          }
        }
        label123:
        do
        {
          return;
          break label384;
          break label235;
          break label387;
          double d1 = (n + 1) / i1 / paramDouble;
          double d2 = n / (i1 + 1) / paramDouble;
          if (d1 < 1.0D) {
            d1 = 1.0D / d1;
          }
          int i2;
          do
          {
            if (d2 < 1.0D) {
              d2 = 1.0D / d2;
            }
            if (i4 == 0)
            {
              if (d1 < d2)
              {
                n++;
                if (((i4 == 0) && (a(paramc_, -n, 0))) || ((i4 == 0) && (a(paramc_, n, 0)))) {
                  break label498;
                }
                i2 = 1;
                if (i2 > i1) {
                  break label123;
                }
                if (i3 != 0) {
                  break label155;
                }
                if ((a(paramc_, -n, -i2)) || ((i4 == 0) && (a(paramc_, -n, i2))) || ((i4 == 0) && (a(paramc_, n, -i2)))) {
                  break label498;
                }
                if (i4 == 0)
                {
                  if (a(paramc_, n, i2)) {
                    break label498;
                  }
                  i2++;
                }
                if (i3 == 0) {
                  break;
                }
              }
              i1++;
              if (i4 != 0) {
                break label139;
              }
            }
            if (((i4 == 0) && (a(paramc_, 0, -i1))) || ((i4 == 0) && (a(paramc_, 0, i1)))) {
              break label498;
            }
            i2 = 1;
            do
            {
              if (i2 > n) {
                break;
              }
            } while (i4 != 0);
            if (i3 != 0) {
              break label155;
            }
            if (i4 != 0) {
              break;
            }
          } while (i3 != 0);
          if ((a(paramc_, i2, -i1)) || ((i4 == 0) && (a(paramc_, i2, i1))) || ((i4 == 0) && (a(paramc_, -i2, -i1)))) {
            break;
          }
          if (i4 == 0)
          {
            if (a(paramc_, -i2, i1)) {
              break;
            }
            i2++;
          }
        } while (i3 == 0);
      }
      label384:
      label387:
      label498:
      paramc_.b(this);
    }
    
    boolean a(c_ paramc_, int paramInt1, int paramInt2, int paramInt3, int paramInt4, a.d.o paramo, boolean paramBoolean)
    {
      int i2 = a.B;
      int i1 = a.A;
      this.h = 2147483647;
      this.i = 0;
      this.j = 0;
      int k = this.c + this.a / 2;
      int m = this.d + this.b / 2;
      c(paramInt1 - k, paramInt2 - m);
      int n = 0;
      do
      {
        if (n >= paramInt4) {
          break;
        }
        if (i1 != 0) {
          break label128;
        }
        if (a(paramc_, 0, 0, n, paramo, paramBoolean))
        {
          if (i2 == 0) {
            if (n != 0) {
              return true;
            }
          }
          return false;
        }
        n += paramInt3;
      } while (i1 == 0);
      if ((i2 == 0) && (paramBoolean)) {
        label128:
        if (i2 == 0)
        {
          if (this.i <= 0)
          {
            if (i2 != 0) {
              break label210;
            }
            if (this.j <= 0) {}
          }
          else
          {
            this.c += this.i;
            this.d += this.j;
            this.e += this.i;
            this.f += this.j;
          }
        }
        else {
          return true;
        }
      }
      label210:
      return false;
    }
    
    boolean a(c_ paramc_, int paramInt1, int paramInt2, int paramInt3)
    {
      return a(paramc_, paramInt1, paramInt2, paramInt3, false);
    }
    
    boolean a(c_ paramc_, int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean)
    {
      return a(paramc_, paramInt1, paramInt2, paramInt3, null, paramBoolean);
    }
    
    boolean a(c_ paramc_, int paramInt1, int paramInt2, int paramInt3, a.d.o paramo, boolean paramBoolean)
    {
      int i3 = a.B;
      int i2 = a.A;
      if (i3 == 0) {
        if (paramInt3 == 0) {
          return a(paramc_, paramInt1, paramInt2, paramo, paramBoolean);
        }
      }
      int k = paramInt3;
      int m = 0;
      int n = paramInt3 * paramInt3;
      int i1 = n;
      if (k >= m)
      {
        if (i2 != 0) {
          break label342;
        }
        if (a(paramc_, paramInt1 + k, paramInt2 + m, paramo, paramBoolean)) {
          return true;
        }
      }
      label333:
      while (i3 != 0)
      {
        if (i3 == 0) {
          if (a(paramc_, paramInt1 + k, paramInt2 - m, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (a(paramc_, paramInt1 - k, paramInt2 + m, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (a(paramc_, paramInt1 - k, paramInt2 - m, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (a(paramc_, paramInt1 + m, paramInt2 + k, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (a(paramc_, paramInt1 + m, paramInt2 - k, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (a(paramc_, paramInt1 - m, paramInt2 + k, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (a(paramc_, paramInt1 - m, paramInt2 - k, paramo, paramBoolean)) {
            return true;
          }
        }
        if (i3 == 0) {
          if (i1 < n)
          {
            i1 += 1 + 2 * m;
            m++;
            if (i3 != 0) {
              break label333;
            }
            if (i2 == 0) {
              break;
            }
          }
        }
        i1 += 2 - 2 * k + 2 * m;
        k--;
        m++;
        if (i2 == 0) {
          break;
        }
      }
      label342:
      return false;
    }
    
    private final boolean a(c_ paramc_, int paramInt1, int paramInt2, boolean paramBoolean)
    {
      return a(paramc_, paramInt1, paramInt2, null, paramBoolean);
    }
    
    private final boolean a(c_ paramc_, int paramInt1, int paramInt2, a.d.o paramo, boolean paramBoolean)
    {
      int m = a.B;
      a.d.w localw = new a.d.w(paramInt1 + this.c + this.a * 0.5D, paramInt2 + this.d + this.b * 0.5D);
      if ((m != 0) || (paramo != null))
      {
        if (m != 0) {
          break label78;
        }
        if (!a.d.o.a(paramo, localw, 1.0D)) {
          return false;
        }
      }
      label78:
      if (m == 0)
      {
        if (!paramBoolean) {
          return a(paramc_, paramInt1, paramInt2);
        }
        this.c += paramInt1;
        this.d += paramInt2;
      }
      int k = a(paramc_);
      if (m == 0) {
        if (k < this.h)
        {
          this.h = k;
          this.i = paramInt1;
          this.j = paramInt2;
        }
      }
      if (m == 0)
      {
        if (k == 0)
        {
          this.e += paramInt1;
          this.f += paramInt2;
          return true;
        }
        this.c -= paramInt1;
        this.d -= paramInt2;
      }
      return false;
    }
    
    private final boolean a(c_ paramc_, int paramInt1, int paramInt2)
    {
      this.c += paramInt1;
      this.d += paramInt2;
      if (a.B == 0)
      {
        if (!c(paramc_))
        {
          this.e += paramInt1;
          this.f += paramInt2;
          return true;
        }
        this.c -= paramInt1;
        this.d -= paramInt2;
      }
      return false;
    }
    
    private int a(c_ paramc_)
    {
      int i6 = a.B;
      int i5 = a.A;
      int k = Math.max(this.c, paramc_.c);
      int m = Math.min(this.c + this.a, paramc_.c + paramc_.a);
      int n = Math.max(this.d, paramc_.d);
      int i1 = Math.min(this.d + this.b, paramc_.d + paramc_.b);
      int i2 = 0;
      int i3 = k;
      label151:
      do
      {
        if (i3 >= m) {
          break;
        }
        if (i5 != 0) {
          break label166;
        }
        int i4 = n;
        do
        {
          do
          {
            if (i4 >= i1) {
              break label151;
            }
            if (i5 != 0) {
              break;
            }
            if (a(i3, i4))
            {
              if (i6 != 0) {
                continue;
              }
              if (paramc_.a(i3, i4)) {
                i2++;
              }
            }
            i4++;
          } while (i5 == 0);
          i3++;
        } while (i6 != 0);
      } while (i5 == 0);
      label166:
      return i2;
    }
    
    public boolean a(int paramInt1, int paramInt2)
    {
      int m = a.B;
      if (m == 0) {
        if (paramInt1 >= this.c)
        {
          if (m != 0) {
            break label68;
          }
          if (paramInt1 < this.c + this.a)
          {
            if (m != 0) {
              break label68;
            }
            if (paramInt2 >= this.d)
            {
              if (m != 0) {
                break label86;
              }
              if (paramInt2 < this.d + this.b) {
                break label69;
              }
            }
          }
        }
      }
      label68:
      return false;
      label69:
      label86:
      int k = (paramInt2 - this.d) * this.a + paramInt1 - this.c;
      return this.g.get(k);
    }
    
    public void a(int paramInt1, int paramInt2, boolean paramBoolean)
    {
      int m = a.B;
      if (((m != 0) || (paramInt1 >= this.c)) && ((m != 0) || (paramInt1 < this.c + this.a)) && ((m != 0) || (paramInt2 >= this.d)))
      {
        if (m != 0) {
          break label92;
        }
        if (paramInt2 < this.d + this.b) {}
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
      label92:
      int k = (paramInt2 - this.d) * this.a + paramInt1 - this.c;
      if (m == 0)
      {
        if (paramBoolean)
        {
          if (m != 0) {
            break label130;
          }
          this.g.set(k);
        }
      }
      else if (a.A == 0) {
        return;
      }
      label130:
      this.g.clear(k);
    }
    
    public void a(int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean)
    {
      int n = a.B;
      if (((n != 0) || (paramInt1 >= this.c)) && ((n != 0) || (paramInt2 < this.c + this.a)) && ((n != 0) || (paramInt3 >= this.d)))
      {
        if (n != 0) {
          break label92;
        }
        if (paramInt3 < this.d + this.b) {}
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
      label92:
      int k = (paramInt3 - this.d) * this.a + paramInt1 - this.c;
      int m = (paramInt3 - this.d) * this.a + paramInt2 - this.c;
      if (n == 0)
      {
        if (paramBoolean)
        {
          if (n != 0) {
            break label155;
          }
          this.g.set(k, m);
        }
      }
      else if (a.A == 0) {
        return;
      }
      label155:
      this.g.clear(k, m);
    }
    
    public void c(int paramInt1, int paramInt2)
    {
      this.c += paramInt1;
      this.d += paramInt2;
      this.e += paramInt1;
      this.f += paramInt2;
    }
    
    public void b(c_ paramc_)
    {
      int i3 = a.B;
      int i2 = a.A;
      if (i3 == 0) {
        if (paramc_.c >= this.c)
        {
          if (i3 != 0) {
            break label137;
          }
          if (paramc_.c < this.c + this.a)
          {
            if (i3 != 0) {
              break label137;
            }
            if (paramc_.d >= this.d)
            {
              if (i3 != 0) {
                break label137;
              }
              if (paramc_.d < this.d + this.b)
              {
                if (i3 != 0) {
                  break label137;
                }
                if (paramc_.c + paramc_.a <= this.c + this.a)
                {
                  if (i3 != 0) {
                    break label212;
                  }
                  if (paramc_.d + paramc_.b <= this.d + this.b) {
                    break label204;
                  }
                }
              }
            }
          }
        }
      }
      label137:
      b(Math.min(paramc_.c, this.c), Math.min(paramc_.d, this.d), Math.max(paramc_.c + paramc_.a, this.c + this.a), Math.max(paramc_.d + paramc_.b, this.d + this.b));
      label204:
      label212:
      int k = paramc_.g.nextSetBit(0);
      do
      {
        if (k < 0) {
          break;
        }
        int m = k % paramc_.a + paramc_.c;
        int n = k / paramc_.a + paramc_.d;
        int i1 = m - this.c + (n - this.d) * this.a;
        this.g.set(i1);
        k = paramc_.g.nextSetBit(k + 1);
      } while (i2 == 0);
    }
    
    void b(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      int i3 = a.B;
      int i2 = a.A;
      int k = paramInt3 - paramInt1;
      o localo = new o(k * (paramInt4 - paramInt2));
      int m = this.g.nextSetBit(0);
      do
      {
        if (m < 0) {
          break;
        }
        int n = m % this.a + this.c;
        int i1 = m / this.a + this.d;
        localo.set(n - paramInt1 + (i1 - paramInt2) * k);
        m = this.g.nextSetBit(m + 1);
        if ((i3 == 0) && (i2 != 0)) {
          return;
        }
      } while (i2 == 0);
      this.g = localo;
      this.c = paramInt1;
      this.d = paramInt2;
      this.a = k;
      if (i3 == 0) {
        this.b = (paramInt4 - paramInt2);
      }
    }
    
    public boolean c(c_ paramc_)
    {
      int i9 = a.B;
      int i8 = a.A;
      if (i9 == 0) {
        if (paramc_.c < this.c + this.a)
        {
          if (i9 != 0) {
            break label95;
          }
          if (paramc_.d < this.d + this.b)
          {
            if (i9 != 0) {
              break label95;
            }
            if (paramc_.c + paramc_.a > this.c)
            {
              if (i9 != 0) {
                break label97;
              }
              if (paramc_.d + paramc_.b > this.d) {
                break label96;
              }
            }
          }
        }
      }
      label95:
      return false;
      label96:
      label97:
      c_ localc_1 = this;
      c_ localc_2 = paramc_;
      int k = Math.max(localc_1.c, localc_2.c);
      int m = Math.min(localc_1.c + localc_1.a, localc_2.c + localc_2.a);
      int n = Math.max(localc_1.d, localc_2.d);
      int i1 = Math.max(localc_1.d + localc_1.b, localc_2.d + localc_2.b);
      if (i9 == 0) {
        if (k < m)
        {
          if (i9 != 0) {
            break label463;
          }
          if (n < i1)
          {
            int i2 = localc_1.a(k, n, k, n, m, i1);
            int i3 = localc_2.a(k, n, k, n, m, i1);
            label389:
            label397:
            label406:
            label457:
            do
            {
              int i4;
              int i6;
              do
              {
                int i5;
                int i7;
                do
                {
                  do
                  {
                    if (i2 < 0) {
                      break label460;
                    }
                    if (i8 != 0) {
                      break label461;
                    }
                    if (i3 < 0) {
                      break label460;
                    }
                    i4 = i2 % localc_1.a + localc_1.c;
                    i5 = i3 % localc_2.a + localc_2.c;
                    i6 = i2 / localc_1.a + localc_1.d;
                    i7 = i3 / localc_2.a + localc_2.d;
                    if (i9 != 0) {
                      break label406;
                    }
                    if (i6 != i7) {
                      break label397;
                    }
                    if (i9 == 0)
                    {
                      if (i4 == i5) {
                        return true;
                      }
                      if (i9 != 0) {
                        break label389;
                      }
                    }
                    if (i4 >= i5) {
                      break;
                    }
                    i2 = localc_1.a(i5, i7, k, n, m, i1);
                    if (i9 != 0) {
                      break label389;
                    }
                  } while (i8 == 0);
                  i3 = localc_2.a(i4, i6, k, n, m, i1);
                } while ((i9 == 0) && (i8 == 0));
                if (i9 != 0) {
                  break label457;
                }
                if (i6 >= i7) {
                  break;
                }
                i2 = localc_1.a(i5, i7, k, n, m, i1);
                if (i9 != 0) {
                  break label457;
                }
              } while (i8 == 0);
              i3 = localc_2.a(i4, i6, k, n, m, i1);
            } while (i8 == 0);
            label460:
            label461:
            return false;
          }
        }
      }
      label463:
      return false;
    }
    
    static final int a(c_ paramc_, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      int i1 = a.B;
      int n = a.A;
      int k = paramInt1 - paramc_.c + (paramInt2 - paramc_.d) * paramc_.a;
      paramInt3 -= paramc_.c;
      paramInt5 -= paramc_.c;
      paramInt4 -= paramc_.d;
      paramInt6 -= paramc_.d;
      if (((i1 != 0) || (k >= 0)) && ((i1 != 0) || (k % paramc_.a >= paramInt3)) && ((i1 != 0) || (k % paramc_.a < paramInt5))) {
        if (i1 == 0)
        {
          if (k / paramc_.a < paramInt4) {
            break label145;
          }
          if (i1 != 0) {
            break label142;
          }
        }
      }
      label142:
      label145:
      int m = k / paramc_.a < paramInt6 ? 1 : 0;
      if (m == 0)
      {
        if (i1 == 0) {
          if (k % paramc_.a < paramInt3)
          {
            k += paramInt3 - k % paramc_.a;
            if (i1 != 0) {
              break label219;
            }
            if (n == 0) {
              break label210;
            }
          }
        }
        k += paramc_.a - k % paramc_.a;
      }
      label210:
      label219:
      k = paramc_.g.nextSetBit(k);
      label296:
      label299:
      do
      {
        if (k < 0) {
          return -1;
        }
        do
        {
          if (((i1 != 0) || (k % paramc_.a >= paramInt3)) && ((i1 != 0) || (k % paramc_.a < paramInt5))) {
            if (i1 == 0)
            {
              if (k / paramc_.a < paramInt4) {
                break label299;
              }
              if (i1 != 0) {
                break label296;
              }
            }
          }
          m = k / paramc_.a < paramInt6 ? 1 : 0;
          if (m == 0) {
            break;
          }
        } while (i1 != 0);
      } while (n != 0);
      return k;
    }
    
    public final int a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      int i1 = a.B;
      int n = a.A;
      int k = paramInt1 - this.c + (paramInt2 - this.d) * this.a;
      paramInt3 -= this.c;
      paramInt5 -= this.c;
      paramInt4 -= this.d;
      paramInt6 -= this.d;
      if (((i1 != 0) || (k >= 0)) && ((i1 != 0) || (k % this.a >= paramInt3)) && ((i1 != 0) || (k % this.a < paramInt5))) {
        if (i1 == 0)
        {
          if (k / this.a < paramInt4) {
            break label145;
          }
          if (i1 != 0) {
            break label142;
          }
        }
      }
      label142:
      label145:
      int m = k / this.a < paramInt6 ? 1 : 0;
      if (m == 0)
      {
        if (i1 == 0) {
          if (k % this.a < paramInt3)
          {
            k += paramInt3 - k % this.a;
            if (i1 != 0) {
              break label219;
            }
            if (n == 0) {
              break label210;
            }
          }
        }
        k += this.a - k % this.a;
      }
      label210:
      label219:
      k = this.g.nextSetBit(k);
      label296:
      label299:
      do
      {
        if (k < 0) {
          return -1;
        }
        do
        {
          if (((i1 != 0) || (k % this.a >= paramInt3)) && ((i1 != 0) || (k % this.a < paramInt5))) {
            if (i1 == 0)
            {
              if (k / this.a < paramInt4) {
                break label299;
              }
              if (i1 != 0) {
                break label296;
              }
            }
          }
          m = k / this.a < paramInt6 ? 1 : 0;
          if (m == 0) {
            break;
          }
        } while (i1 != 0);
      } while (n != 0);
      return k;
    }
    
    public String toString()
    {
      int i2 = a.B;
      int i1 = a.A;
      StringBuffer localStringBuffer = new StringBuffer(this.a * this.b + this.b + 1);
      int k = 0;
      int m = 0;
      label109:
      do
      {
        if (m >= this.b) {
          break;
        }
        int n = 0;
        do
        {
          do
          {
            if (n >= this.a) {
              break label109;
            }
            if (i1 != 0) {
              break;
            }
            if (this.g.get(k))
            {
              localStringBuffer.append('#');
              if (i2 != 0) {
                continue;
              }
              if (i1 == 0) {}
            }
            else
            {
              localStringBuffer.append('.');
            }
            k++;
            n++;
          } while (i1 == 0);
          localStringBuffer.append('\n');
          m++;
        } while (i2 != 0);
      } while (i1 == 0);
      return "x: " + this.c + " y: " + this.d + "\n" + localStringBuffer.toString();
    }
  }
  
  class d_
    implements m.g_
  {
    d_() {}
    
    public void a(Object paramObject1, Object paramObject2)
    {
      int j = a.B;
      int i = a.A;
      k.e_ locale_1 = (k.e_)paramObject1;
      k.e_ locale_2 = (k.e_)paramObject2;
      if (j == 0) {
        if (locale_1.g == 1)
        {
          if (j != 0) {
            break label118;
          }
          if (locale_2.g == 1)
          {
            localn = (n)locale_1.e;
            localObject = (n)locale_2.e;
            if (j == 0)
            {
              if (n.a(localn, (n)localObject) == null) {
                return;
              }
              locale_1.h += 1;
              locale_2.h += 1;
            }
            if ((j == 0) && (i == 0)) {
              return;
            }
          }
        }
      }
      label118:
      if (j == 0)
      {
        if (locale_1.g != 1)
        {
          if (j != 0) {
            break label247;
          }
          if (locale_2.g != 1) {
            break label243;
          }
        }
        if (j != 0) {
          break label162;
        }
      }
      label162:
      n localn = (n)(locale_1.g == 1 ? locale_1.e : locale_2.e);
      if (j == 0) {}
      Object localObject = locale_1.g != 1 ? locale_1.a() : locale_2.a();
      if (j == 0)
      {
        if (!localn.a((t)localObject)) {
          return;
        }
        locale_1.h += 1;
        if (j == 0) {
          locale_2.h += 1;
        }
      }
      else if (i == 0)
      {
        return;
      }
      label243:
      label247:
      if (j == 0)
      {
        if (locale_1.f == locale_2.e) {
          return;
        }
        if (j != 0) {}
      }
      else
      {
        if (locale_2.f == locale_1.e) {
          return;
        }
        locale_1.h += 1;
      }
      locale_2.h += 1;
    }
  }
  
  class e_
    implements p
  {
    static final byte a = 0;
    static final byte b = 1;
    static final byte c = 2;
    static final byte d = 3;
    Object e;
    Object f;
    byte g;
    int h = 0;
    boolean i = false;
    
    e_(Object paramObject1, Object paramObject2, byte paramByte, boolean paramBoolean)
    {
      this.e = paramObject1;
      this.f = paramObject2;
      this.g = paramByte;
      this.i = paramBoolean;
    }
    
    public boolean b()
    {
      int j = a.B;
      if (j == 0) {
        if (this.g != 2) {
          if (j != 0) {
            break label29;
          }
        }
      }
      label29:
      return this.g == 3;
    }
    
    public t a()
    {
      int j = a.B;
      if (j == 0) {
        if (this.g == 1) {
          return ((n)this.e).a();
        }
      }
      if (j == 0)
      {
        if (this.g == 3) {
          return k.this.a((wb)this.e, this.f);
        }
        if (j != 0) {}
      }
      else if (this.g == 2)
      {
        return k.this.a((xc)this.e, this.f);
      }
      zc localzc = k.this.a.d(this.e);
      return new t(localzc.a(), localzc.b(), localzc.c(), localzc.d());
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.e.k

 * JD-Core Version:    0.7.0.1

 */